/*
*************************************************************************
*西瑞克斯研发管理系统
*版 本: 1.0   
*日 期：02/16/2012    
*作 者： 王浩 QQ：873987060   
*************************************************************************   
*/ 
package com.application.yfprojectplan.entity;
import org.apache.commons.lang.builder.ReflectionToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import com.manager.IBaseBean;
import com.manager.commons.StringUtil;

import java.util.Date;
 /**
 * 
 * Description:YfProjectPlanItem实体<br />
 * 
 * Version:V0.1<br />
 * 
 * Author: 王浩 QQ：873987060    <br />
 * 
 * History: <br />
 * 
 * 02/16/2012 
 * 
 */
@Entity
@Table(name="yf_project_plan_item")
public class YfProjectPlanItem implements IBaseBean
{

	/** serialVersionUID */
	protected static final long serialVersionUID = -1L;
	
	public YfProjectPlanItem(){
  
	}

			        @Id
			@Column(name="id")
	private String id;  //$field.label
        
        		@Column(name="plan_id")
	private String planId;  //$field.label
        
        		@Column(name="start_date")
	private Date startDate;  //$field.label
        
        		@Column(name="end_date")
	private Date endDate;  //$field.label
        
        		@Column(name="plan_content")
	private String planContent;  //$field.label
        
        		@Column(name="order_no")
	private Long orderNo;  //$field.label
        
        		@Column(name="operateid",updatable=false)
	private String operateid;  //$field.label
        
        		@Column(name="create_date")
	private Date createDate;  //$field.label
       
     @Transient
      private String startDateStr;
     @Transient
      private String endDateStr;
      
  	public String getStartDateStr() {
		String re = "";
		if(this.startDate == null) {
			return re;
		}
		try {
			re = StringUtil.dateToString(this.startDate);
		}
		catch(Exception e) {
			e.printStackTrace();
		}
		return re;
	}

	public void setStartDateStr(String starttimeStr) {
		this.startDateStr = starttimeStr;
		if(this.startDateStr != null && !"".equals(this.startDateStr)) {
			try {
				this.startDate = StringUtil.stringToDate(this.startDateStr);
			}
			catch(Exception e) {
				e.printStackTrace();
			}
		}
	}

	public String getEndDateStr() {
		String re = "";
		if(this.endDate == null) {
			return re;
		}
		try {
			re = StringUtil.dateToString(this.endDate);
		}
		catch(Exception e) {
			e.printStackTrace();
		}
		return re;
	}

	public void setEndDateStr(String endtimeStr) {
		this.endDateStr = endtimeStr;
		if(this.endDateStr != null && !"".equals(this.endDateStr)) {
			try {
				this.endDate = StringUtil.stringToDate(this.endDateStr);
			}
			catch(Exception e) {
				e.printStackTrace();
			}
		}
	}
        	/**
	 * ${field.getLabel()}
	 * @return Returns the Id.
	 */
	public String getId(){
		return this.id;
	}
	
	/**
	 * @param id Set the id.
	 */	
	public void setId(String id){
		this.id = id;
	}
		
        	/**
	 * ${field.getLabel()}
	 * @return Returns the PlanId.
	 */
	public String getPlanId(){
		return this.planId;
	}
	
	/**
	 * @param planId Set the planId.
	 */	
	public void setPlanId(String planId){
		this.planId = planId;
	}
		
        	/**
	 * ${field.getLabel()}
	 * @return Returns the StartDate.
	 */
	public Date getStartDate(){
		return this.startDate;
	}
	
	/**
	 * @param startDate Set the startDate.
	 */	
	public void setStartDate(Date startDate){
		this.startDate = startDate;
	}
		
        	/**
	 * ${field.getLabel()}
	 * @return Returns the EndDate.
	 */
	public Date getEndDate(){
		return this.endDate;
	}
	
	/**
	 * @param endDate Set the endDate.
	 */	
	public void setEndDate(Date endDate){
		this.endDate = endDate;
	}
		
        	/**
	 * ${field.getLabel()}
	 * @return Returns the PlanContent.
	 */
	public String getPlanContent(){
		return this.planContent;
	}
	
	/**
	 * @param planContent Set the planContent.
	 */	
	public void setPlanContent(String planContent){
		this.planContent = planContent;
	}
		
        	/**
	 * ${field.getLabel()}
	 * @return Returns the OrderNo.
	 */
	public Long getOrderNo(){
		return this.orderNo;
	}
	
	/**
	 * @param orderNo Set the orderNo.
	 */	
	public void setOrderNo(Long orderNo){
		this.orderNo = orderNo;
	}
		
        	/**
	 * ${field.getLabel()}
	 * @return Returns the Operateid.
	 */
	public String getOperateid(){
		return this.operateid;
	}
	
	/**
	 * @param operateid Set the operateid.
	 */	
	public void setOperateid(String operateid){
		this.operateid = operateid;
	}
		
        	/**
	 * ${field.getLabel()}
	 * @return Returns the CreateDate.
	 */
	public Date getCreateDate(){
		return this.createDate;
	}
	
	/**
	 * @param createDate Set the createDate.
	 */	
	public void setCreateDate(Date createDate){
		this.createDate = createDate;
	}
		
                public String toString(){
		return ReflectionToStringBuilder.toString(this,ToStringStyle.MULTI_LINE_STYLE);
	}
}
